<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CAReportePDHorarios.aspx.cs" Inherits="CAReportePDHorarios" %>

<%@ Register Src="UCFiltroRPT.ascx" TagName="UCFiltroRPT" TagPrefix="uc2" %>

<%@ Register Src="MenuSuperior.ascx" TagName="MenuSuperior" TagPrefix="uc1" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dxwgv" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Reporte de turnos y horarios realizados</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body style="text-align: center">
    <form id="form1" runat="server">
    <div>
        <uc1:MenuSuperior ID="MenuSuperior1" runat="server" />
    
    </div>
        <table align="center">
        <tr>
            <td>
                Sector</td>
            <td align="Left">
                <dxe:ASPxComboBox ID="SectoresComboBox" runat="server" 
                    DataSourceID="dsSectores" TextField="Descripcion" ValueField="IdSector" 
                    ValueType="System.String">
                    <ValidationSettings CausesValidation="True" 
                        ValidationGroup="ReporteParteDiarioPersonal">
                        <RequiredField IsRequired="True" />
                    </ValidationSettings>
                </dxe:ASPxComboBox>
                <asp:ObjectDataSource ID="dsSectores" runat="server" 
                    SelectMethod="ObtenerTodosLosSectores" 
                    TypeName="RC.ControlAcceso.ObjetosNegocio.CA2SectorColeccion">
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td>
                Fecha</td>
            <td align="Left">
                <dxe:ASPxDateEdit ID="DesdeDateTime" runat="server">
                </dxe:ASPxDateEdit>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="DesdeDateTime" Display="Dynamic" 
                    ErrorMessage="Ingrese una fecha" ValidationGroup="ReporteParteDiarioPersonal"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="Left">
                <dxe:ASPxButton ID="btnGenerarReporteParteDiarioDelPersonal" runat="server" 
                    CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                    CssPostfix="Office2003_Olive" 
                    OnClick="btnGenerarReporteParteDiarioDelPersonal_Click" Text="Generar" 
                    ValidationGroup="ReporteParteDiarioPersonal">
                </dxe:ASPxButton>
            </td>
        </tr>
    </table>
    <table align="center">
                    <tr>
                        <td>
                            Exportar:
                        </td>
                        <td>
                            <dxe:ASPxButton ID="btnExprotarPDF" runat="server" 
                                CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                                CssPostfix="Office2003_Olive" OnClick="btnExprotarPDF_Click" Text="PDF" 
                                Width="50px" ValidationGroup="ReporteParteDiarioPersonal">
                            </dxe:ASPxButton>
                        </td>
                        <td>
                            <dxe:ASPxButton ID="btnExportarExcel" runat="server" 
                                CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                                CssPostfix="Office2003_Olive" OnClick="btnExportarExcel_Click" Text="Excel" 
                                Width="50px" ValidationGroup="ReporteParteDiarioPersonal">
                            </dxe:ASPxButton>
                        </td>
        </tr>
        </table>
        <table align="center">
        <tr>
            <td colspan="3">
                
                <dxwgv:ASPxGridView ID="gvPartesdiarios" runat="server" 
                    AutoGenerateColumns="False" 
                    CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                    CssPostfix="Office2003_Olive" DataSourceID="dsPartesDiarios">
                    <Styles CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css" 
                        CssPostfix="Office2003_Olive">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="10px">
                        </LoadingPanel>
                    </Styles>
                    <Columns>
                        <dxwgv:GridViewDataTextColumn Caption="Nombre" 
                            FieldName="LegajoYNombreEmpleado" ReadOnly="True" VisibleIndex="0" CellStyle-Wrap="False" >
<CellStyle Wrap="False" horizontalalign="Left"></CellStyle>
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Entra"  SortIndex="0"
                            FieldName="EntradaProgramadaStringHora" ReadOnly="True" SortOrder="Ascending" VisibleIndex="1">
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Sale" 
                            FieldName="SalidaProgramadaStringHora" ReadOnly="True" VisibleIndex="2">
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Salubre" FieldName="HorasSalubreString" 
                            VisibleIndex="3">
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Insalubre" FieldName="HorasInsalubreString" 
                            VisibleIndex="4">
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Curso" FieldName="HorasCursoString" 
                            ReadOnly="True" VisibleIndex="5">
                        </dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn Caption="Trabajo efectuado" 
                            FieldName="CodigoDeFaltaNombre" ReadOnly="True" VisibleIndex="6">
                        </dxwgv:GridViewDataTextColumn>
                    </Columns>
                    <SettingsPager Mode="ShowAllRecords">
                    </SettingsPager>
                    <Images ImageFolder="~/App_Themes/Office2003Olive/{0}/">
                        <CollapsedButton Height="12px" 
                            Url="~/App_Themes/Office2003Olive/GridView/gvCollapsedButton.png" 
                            Width="11px" />
                        <ExpandedButton Height="12px" 
                            Url="~/App_Themes/Office2003Olive/GridView/gvExpandedButton.png" Width="11px" />
                        <DetailCollapsedButton Height="12px" 
                            Url="~/App_Themes/Office2003Olive/GridView/gvCollapsedButton.png" 
                            Width="11px" />
                        <DetailExpandedButton Height="12px" 
                            Url="~/App_Themes/Office2003Olive/GridView/gvExpandedButton.png" Width="11px" />
                        <FilterRowButton Height="13px" Width="13px" />
                    </Images>
                    <StylesEditors>
                        <ProgressBar Height="25px">
                        </ProgressBar>
                    </StylesEditors>
                </dxwgv:ASPxGridView>
                
                <asp:ObjectDataSource ID="dsPartesDiarios" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    OnSelecting="dsPartesDiarios_Selecting" SelectMethod="ObtenerPartesDiariosPor" 
                    TypeName="RC.ControlAcceso.ObjetosNegocio.CA2ParteDiario">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DesdeDateTime" DefaultValue="01/01/1900" 
                            Name="pFechaDesde" PropertyName="Value" Type="DateTime" />
                        <asp:Parameter DefaultValue="01/01/1900" Name="pFechaHasta" Type="DateTime" />
                        <asp:Parameter DefaultValue="0" Name="pLegajoIdDesde" Type="Int32" />
                        <asp:Parameter DefaultValue="" Name="pAutorizado" Type="String" />
                        <asp:ControlParameter ControlID="SectoresComboBox" DefaultValue="" 
                            Name="pSectorId" PropertyName="Value" Type="Int32" />
                        <asp:Parameter DefaultValue="999999999" Name="pLegajoIdHasta" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                
                <dxwgv:ASPxGridViewExporter ID="gvExport" runat="server" 
                    GridViewID="gvPartesdiarios">
                </dxwgv:ASPxGridViewExporter>
                
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
